﻿using AnyCAD.Foundation;
using AnyCAD.NX.Command;
using AnyCAD.NX.Controls;
using AnyCAD.NX.View;
using AnyCAD.NX.ViewModel;

namespace AnyCAD.Modeling.Sphere
{
    /// <summary>
    /// UserControl1.xaml 的交互逻辑
    /// </summary>
    public partial class SphereView : AuSubView
    {
        public SphereView()
        {
            InitializeComponent();
        }
    }

    class NewSphereCommand : ComponentCommand
    {
        public NewSphereCommand()
        {
        }

        public override string Name { get => nameof(SphereModel); }


        public override PersistentViewModel CreateViewModel(Element element, GeneralComponent component, MainViewModel mainModel)
        {
            return new SphereViewModel(element, component, mainModel);
        }

        public override void CreateView(ICommandView view, EntityViewModel entityViewModel)
        {
            view.AddView(new SphereView());
        }

    }
}
